package com.gentle.platform.service.impl;

import java.util.List;
import com.gentle.common.utils.DateUtils;
import com.gentle.platform.domain.FmUserForm;
import com.gentle.platform.mapper.FmUserFormMapper;
import com.gentle.platform.service.IFmUserFormService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 用户单Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-12-17
 */
@Service
public class FmUserFormServiceImpl implements IFmUserFormService
{
    @Autowired
    private FmUserFormMapper fmUserFormMapper;

    /**
     * 查询用户单
     * 
     * @param id 用户单主键
     * @return 用户单
     */
    @Override
    public FmUserForm selectFmUserFormById(Long id)
    {
        return fmUserFormMapper.selectFmUserFormById(id);
    }

    /**
     * 查询用户单列表
     * 
     * @param fmUserForm 用户单
     * @return 用户单
     */
    @Override
    public List<FmUserForm> selectFmUserFormList(FmUserForm fmUserForm)
    {
        return fmUserFormMapper.selectFmUserFormList(fmUserForm);
    }

    /**
     * 新增用户单
     * 
     * @param fmUserForm 用户单
     * @return 结果
     */
    @Override
    public int insertFmUserForm(FmUserForm fmUserForm)
    {
        fmUserForm.setCreateTime(DateUtils.getNowDate());
        return fmUserFormMapper.insertFmUserForm(fmUserForm);
    }

    /**
     * 修改用户单
     * 
     * @param fmUserForm 用户单
     * @return 结果
     */
    @Override
    public int updateFmUserForm(FmUserForm fmUserForm)
    {
        fmUserForm.setUpdateTime(DateUtils.getNowDate());
        return fmUserFormMapper.updateFmUserForm(fmUserForm);
    }

    /**
     * 批量删除用户单
     * 
     * @param ids 需要删除的用户单主键
     * @return 结果
     */
    @Override
    public int deleteFmUserFormByIds(Long[] ids)
    {
        return fmUserFormMapper.deleteFmUserFormByIds(ids);
    }

    /**
     * 删除用户单信息
     * 
     * @param id 用户单主键
     * @return 结果
     */
    @Override
    public int deleteFmUserFormById(Long id)
    {
        return fmUserFormMapper.deleteFmUserFormById(id);
    }
}
